1. Field
The present embodiments relate to generating topology information identifying devices in a network topology.
2. Description of the Related Art
An adaptor or multi-channel protocol controller enables a device coupled to the adaptor to communicate with one or more connected end devices over a connection according to a storage interconnect architecture, also known as a hardware interface, where a storage interconnect architecture defines a standard way to communicate and recognize such communications, such as Serial Attached Small Computer System Interface (SCSI) (SAS), Serial Advanced Technology Attachment (SATA), Fibre Channel, etc. Further details on the SAS architecture for devices and expanders is described in the technology specification “Information Technology—Serial Attached SCSI (SAS)”, reference no. ISO/IEC 14776-150:200x and ANSI INCITS.***:200x PHY layer (Jul. 9, 2003), published by ANSI (referred to herein as the “SAS Specification”); details on the Fibre Channel architecture are described in the technology specification “Fibre Channel Framing and Signaling Interface”, document no. ISO/IEC AWI 14165-25; details on the SATA architecture are described in the technology specification “Serial ATA: High Speed Serialized AT Attachment” Rev. 1.0A (January 2003).
Devices may communicate through a cable or through etched paths on a printed circuit board when the devices are embedded on the printed circuit board. These storage interconnect architectures allow a device to maintain one or more connections with end devices through a direct connection to the end device or through one or more expanders. In the SAS/SATA architecture, a SAS port is comprised of one or more SAS PHYs, where each SAS PHY interfaces a physical layer, i.e., the physical interface or connection, and a SAS link layer having multiple protocol link layer. Communications from the SAS PHYs in a port are processed by the transport layers for that port. There is one transport layer for each SAS port to interface with each type of application layer supported by the port. A “PHY” as defined in the SAS protocol is a device object that is used to interface to other devices and a physical interface.
An expander is a device that facilitates communication and provides for routing among multiple SAS devices, where multiple SAS devices and additional expanders connect to the ports on the expander, where each port has one or more SAS PHYs and corresponding physical interfaces. The expander also extends the distance of the connection between SAS devices. With an expander, a device connecting to a SAS PHY on the expander may be routed to another expander PHY connected to a SAS device. Further details on the SAS architecture for devices and expanders is described in the SAS Specification.
A port in an adaptor or expander contains one or more PHYs. Ports in a device are associated with PHYs based on the configuration that occurs during an identification sequence. A port is assigned one or more PHYs within a device for those PHYs within that device that are configured to use the same SAS address during the identification sequence and that connect to attached PHYs that also transmit the same address during the identification sequence. A wide port has multiple PHYs and a narrow port has only one PHY. A wide link comprises the set of physical links that connect the PHYs of a wide port to the corresponding PHYs in the corresponding remote wide port and a narrow link is the physical link that attaches a narrow port to a corresponding remote narrow port.
The SAS specification provides two expander types, a fanout expander and an edge expander. A fanout expander may be located between edge expanders. An edge expander PHY connects to a fanout expander PHY, and each fanout expander PHY may connect to a separate edge expander, which edge expander connects to end devices. However, in the current SAS specification, there can only be one fanout expander in a domain. A domain comprises all devices that can be reached through an initiator port, where the port may connect to multiple target devices through one or more expanders or directly. Further, each edge expander device set shall not be attached to more than one fanout expander device. An edge expander device set may be attached to one other edge expander device set if that is the only other edge expander device set in the domain and there are no fanout expander devices in the domain.
After the identify and link initialization sequences where the initiator obtains the address of each PHY connected to one of its PHYs, the initiator performs link initialization to determine all devices that can be accessed from one port, otherwise known as the domain for that port. The initiator begins the discovery process by determining that an expander is attached and configures the attached expander if configuration is necessary. The initiator then traverses the topology by opening a Serial Management Protocol (SMP) connection to the attached expander device and querying each expander PHY in ascending order using the SMP DISCOVER function to discover the PHYs on devices connected to the expander PHYs. If the initiator discovers that a device attached to the expander PHY being queried is a further expander, then the initiator will issue SMP discovery requests to discover every device and its PHYs attached to that further expander. This process continues until the initiator discovers all target devices in the domain of each port on the initiator. This process is further repeated by every end device, i.e., initiator and target, in a topology to discover all connected devices in the topology.